function checkLogin(){
    const user = localStorage.getItem('loggedinUser');

    if(!user)
    {
        alert('You must be logged in to see this page!');
        window.location.href = '../login.html';
    }
}checkLogin();